package com.cwf.common.enums;


/**
 * 状态码状态枚举定义
 */
public enum ResCodeEnum{

    SUCCESS(200,"操作成功"),
    ERROR(400,"操作失败"),



    LOGIN(1,"登入成功"),
    LOGIN_ERR(-1,"登入失败"),


    NUll(0,null),
    SERVICE_ERR(500,"服务器异常"),


    AUTH_ERROR(401,"token失效"),
    PARAM_ERR(402,"参数无效"),
    AUTH_RANK(403,"权限不足"),


    INSERT(2000,"添加成功"),
    DELETE(2001,"删除成功"),
    UPDATE(2002,"更新成功"),
    QUERY(2003,"查询成功"),
    FILE_UPLOAD(2004,"上传成功"),
    DELETE_UPLOAD_FILE(2005,"删除文件成功"),
    SELECTONE(2006,"获取详情"),




    INSERT_ERR(4000,"添加失败"),
    DELETE_ERR(4001,"删除失败"),
    UPDATE_ERR(4002,"更新失败"),
    QUERY_ERR(4003,"查询失败"),
    FILE_UPLOAD_ERR(4004,"上传失败"),
    DELETE_UPLOAD_FILE_ERR(4005,"删除文件失败"),
    SELECTONE_ERR(4006,"获取详情失败");




    private int code;

    private String msg;

    public int getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }

    ResCodeEnum(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }
}

